package com.vne.skyemart.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name = "ShippingType",catalog = "skyemart_db")
public class ShippingType implements Serializable{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1970279342936037914L;

	@Id
	@GeneratedValue
	@Column(name = "ShippingID",nullable = false,unique = true)
	private int shippingID;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "CartID",nullable = false)
	private Cart cart;

	@Column(name = "Name",nullable = false,length = 50)
	private String name;

	@Column(name = "Description",length = 250)
	private String description;

	@Column(name = "Status",nullable = false)
	private boolean status = false;
	/**
	 * GETTER AND SETTER
	 * 
	 */
	public int getShippingID() {
		return shippingID;
	}
	public void setShippingID(int shippingID) {
		this.shippingID = shippingID;
	}
	public Cart getCart() {
		return cart;
	}
	public void setCart(Cart cart) {
		this.cart = cart;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	public boolean isStatus() {
		return status;
	}
	public void setStatus(boolean status) {
		this.status = status;
	}
	public static long getSerialversionuid() {
		return serialVersionUID;
	}
}
